package nl.Viewer.SerializedObjects;

import java.util.HashMap;

/**
 * Client-side deserialization of a visualization 
 * 
 * @author Jeroen Verschuur
 * 
 */

public class Visualization {
   public final int                   visualizationId;
   public final String                name;
   public final String                visualizationType;
   protected HashMap<Integer, Output> outputs = new HashMap<Integer, Output>();

   public Visualization( int visualizationId, String name, String visualizationType ) {
      this.visualizationId = visualizationId;
      this.name = name;
      this.visualizationType = visualizationType;
   }

   public void addOutput( Output output ) {
      outputs.put( output.outputId, output );
   }

   public Output getOutput( int outputId ) {
      return outputs.get( outputId );
   }

   public int getVisualizationId() {
      return visualizationId;
   }

   public String getName() {
      return name;
   }

   public HashMap<Integer, Output> getOutputs() {
      return outputs;
   }

   public String toString() {
      return "Visualization: [" + visualizationId + "/" + name + "/"+visualizationType+"/outputs:" + outputs.size() + "]";
   }

   public String getVisualizationType() {
      return visualizationType;
   }

}
